<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
	<head>
		<title>Adulte > Traitement</title>
		<meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/style.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/style_page.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/onglets.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/transport.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/formulaire.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../mise_en_page/css/validation.css" media="screen" />
		
		<script type="text/javascript" src="../utilitaires.js"></script>
		
	</head>

	<body>
		<h1>GTS Brin de Soleil</h1>
		<div id="menu">
			<?php
				require_once("../mise_en_page/menu_saisie.php");
			?>
		</div>
		<div>
		<?php
			echo "EN COURS ....:<br/>";
			
			/*$matricule = $_POST['matricule'];
			$date_creation = $_POST['creation'];
			*/
			
			/*************************************************
			* Récupération des valeurs des champs
			**************************************************/
			$date_creation = "2011-05-01";
			$identite_id = 1;
			$coordonnee_id = 1;
			$date_naissance = "2011-05-01";
			$lieu_naissance = "lieu de naissance" ;
			$num_adherent = 1;
			$responsable_inscription = "responsable inscription";
			$num_compte_comptable = 1234;
			$radiation_id = 1;
			$dossier_suivi_par = "dossier suivi par";
			$etab_freq_id = 1;
			$etab_resp_id = 1;
			$etab_dest_id = 1;
			$etab_fact_id = 1;
			$etab_resp_legal_id = 1;
			$commentaires = "commentaires";
			$foyer = 1;
			$carac_adulte_id = 1;
			
			//echo "matricule:$matricule | date_creation:$date_creation";
			
			
			//require_once("./connexion.php");
			include("./connexion.php");
			
			$requete="INSERT INTO adulte ( 
					`date_creation`,
					`identite_id`,
					`coordonnee_id`,
					`date_naissance`,
					`lieu_naissance`,
					`num_adherent`,
					`responsable_inscription`,
					`num_compte_comptable`,
					`radiation_id`,
					`dossier_suivi_par`,
					`etab_freq_id`,
					`etab_resp_id`,
					`etab_dest_id`,
					`etab_fact_id`,
					`etab_resp_legal_id`,
					`commentaires`,
					`foyer`,
					`carac_adulte_id`
					)
				VALUES (
					'$date_creation',
					$identite_id,
					$coordonnee_id,
					'$date_naissance',
					'$lieu_naissance',
					$num_adherent,
					'$responsable_inscription',
					$num_compte_comptable,
					$radiation_id,
					'$dossier_suivi_par',
					$etab_freq_id,
					$etab_resp_id,
					$etab_dest_id,
					$etab_fact_id,
					$etab_resp_legal_id,
					'$commentaires',
					$foyer,
					$carac_adulte_id
				);";
			
			$reponse=mysql_query($requete,$connexion);
			echo mysql_error();
			/**************************************************************
			* Visualisation de la table adulte
			**************************************************************/
			//require_once("./connexion.php");	// pas besoin ?
			$requete="SELECT * FROM `adulte`";
			$reponse=mysql_query($requete,$connexion);
			echo "<table>
			<tr>
				<th>date_creation</th>
				<th>identite_id</th>
				<th>coordonnee_id</th>
				<th>date_naissance</th>
				<th>lieu_naissance</th>
				<th>num_adherent</th>
				<th>responsable_inscription</th>
				<th>num_compte_comptable</th>
				<th>radiation_id</th>
				<th>dossier_suivi_par</th>
				<th>etab_freq_id</th>
				<th>etab_resp_id</th>
				<th>etab_dest_id</th>
				<th>etab_fact_id</th>
				<th>etab_resp_legal_id</th>
				<th>commentaires</th>
				<th>foyer</th>
				<th>carac_adulte_id</th>
			</tr>";
			while ($donnees=mysql_fetch_array($reponse)){		
				echo "<tr>";
				for($i=0; $i<sizeof($donnees)/2; $i++){	// pourquoi ?
					echo "<td>".$donnees[$i]."</td>";
				}
				echo "</tr>";
			}
			echo "</table>";
			mysql_close();  // Pour fermer la connexion
		?>
		
		</div>
	</body>
</html>




